﻿using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SharePoint;
using System.Web.UI.WebControls;
using Microsoft.SharePoint.Administration;

namespace Macaw.Moss2007.CustomErrorPageSolution
{
    public class GenericCustomErrorPage : Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase
    {
        protected Literal litMainContent;

        protected override void CreateChildControls()
        {
            litMainContent.Text = string.Format("An error has occured on SubWeb \"{0}\"", SPContext.Current.Web.ServerRelativeUrl);

            base.CreateChildControls();

            Response.StatusCode = 500;
        }
    }
}
